package test 
{
	import com.greensock.TweenNano;
	import Elegant.utils.ArrayUtil;
	import Elegant.utils.VectorUtil;
	import flash.display.Sprite;
	import flash.utils.getTimer;
	import lynch.core.Core;
	import lynch.map.WorldMap;
	
	/**
	 * ...
	 * @author 小痛
	 */
	public class SpeedTest extends Sprite 
	{
		private var arr:Vector.<Object>;
		
		public function SpeedTest() 
		{
			super();
			
			ready();
		}
		
		private function ready():void 
		{
			//arr = Vector.<Object>([]);
			//for (var i:int = 0; i < 100000; i++) 
			//{
				//arr[i] = {y:100000 - i};
			//}
			TweenNano.delayedCall(2, start);
		}
		
		private function start():void 
		{
			trace("start");
			var t:int = getTimer();
			var map:WorldMap = Core.map;
			for (var i:int = 0; i < 100000; i++) 
			{
				map.x += 128;
				map.y += 128;
				map.updateTiles();
			}
			
			trace("the end: " + (getTimer() - t))
		}
		
	}

}